package com.cuitrip.business.webview;

import com.cuitrip.apiservice.BusinessHelper;
import com.cuitrip.util.I118Util;

/**
 * Created by ak on 15/10/20.
 */
public class H5UrlMaker {

    public static final String H5_ONLINE_URL = "http://m.tripinsiders.com";

    public static final String USER_AGGREEMENT = "/app/terms-user";

    public static final String TRAVEL_AGREEMENT = "/app/terms-traveller";
    public static final String INSIDER_AGREEMENT = "/app/terms-insider";

    public static final String CANCEL_INSIDER = "/app/terms-refund-insider";
    public static final String CANCEL_TRAVELLER = "/app/terms-refund-traveller";

    public static final String HELP = "/app/help";


    public static final String TRIP_DESC = "/service/previewServiceDesc";

    public static final String TRIP_SNAPSHOT_DESC = "/service/snapshot";

    public static final String BUG_FIX_URL = "/bugFix/android";

    public static final String PASSWORD_FORGET_URL = "/app/user/findPwd";

    public static final String APP = "/app";

    public static String H5_URL = BusinessHelper.API_URL.equals(BusinessHelper.BASE_ONLINE_URL)? H5_ONLINE_URL:BusinessHelper.API_URL;

    public static String getUserAggreement() {
        return bindWithLanguage(H5_URL + USER_AGGREEMENT);
    }

    public static String getTravelAgreement() {
        return bindWithLanguage(H5_URL + TRAVEL_AGREEMENT);
    }

    public static String getInsiderAgreement() {
        return bindWithLanguage(H5_URL + INSIDER_AGREEMENT);
    }

    public static String getCancelInsiderUrl() {
        return bindWithLanguage(H5_URL + CANCEL_INSIDER);
    }

    public static String getCancelTravellerUrl() {
        return bindWithLanguage(H5_URL + CANCEL_TRAVELLER);
    }

    public static String getHelpUrl() {
        return bindWithLanguage(H5_URL + HELP);
    }

    public static String getTripDesc() {
        return H5_URL + TRIP_DESC;
    }

    public static String getTripSnapShotDesc() {
        return H5_URL + TRIP_SNAPSHOT_DESC;
    }


    public static String bindWithLanguage(String baseUrl) {
        return baseUrl + "?locale=" + I118Util.getH5LanguageTag();
    }

    public static String getPasswordForget() {
        return bindWithLanguage(H5_URL+PASSWORD_FORGET_URL);
    }

    public static String getShareFriendUrl(){
        return H5_URL + APP;
    }

    //// TODO: 16/3/14
    public static String getPayoutFAQs(){
        return null;
    }
}
